{ "cells": [ { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "# HyperText Markup Language\n", "\n", "HyperText Markup Language (HTML), is the standard markup language used to create web pages. \n", "\n", "* Used as markup language for basically every website on the internet.\n", "* Developed by the World Wide Web Consortium (W3C).\n", "* The current (and probably final) version is HTML5, a \"Living Standard\"\n", "\n", "\n", "## Resources\n", "\n", "- Lots of offline and online material available\n", "- [MDN HTML reference](https://developer.mozilla.org/en-US/docs/Web/HTML)\n", "- [w3schools HTML tutorial](https://www.w3schools.com/html)\n", " \n", "\n", "## A simple HTML document\n", "\n", "The Hello world version of an HTML document is:\n", "\n", "```html\n", "\n", "\n", "\n", " \n", "
\n", "Hello world!
\n", " \n", " \n", "\n", "```\n", "\n", "Save this file as `index.html` and open it with your favorite web browser, e.g. `open index.html`" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "!open index.html" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Syntax\n", "\n", "* The HTML file consists of tags, denoted by `\n", "Ås, Sør-Trøndelag\n", "
\n" ], "text/plain": [ "\n", "Ås, Sør-Trøndelag\n", "
" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Special characters alternative:\n", "\n", "Save your file with UTF-8 encoding (check your editor), and add the character encoding to your HTML document:\n", "\n", "```html\n", "\n", " \n", "\n", "```\n", "Then you can write ~any special character directly in the document." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "# Paragraphs" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "This is a paragraph.\n", "
\n", "\n", "This is another paragraph.\n", "
\n" ], "text/plain": [ "\n", "This is a paragraph.\n", "
\n", "\n", "This is another paragraph.\n", "
" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Italic text, bold text and links" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "Bold text\n", "\n", "Name | \n", "Course | \n", "Points | \n", "
---|---|---|
Charles | \n", "INF3331 | \n", "50 | \n", "
Ada | \n", "INF4331 | \n", "94 | \n", "
Name | \n", "Course | \n", "Points | \n", "
---|---|---|
Charles | \n", "INF3331 | \n", "50 | \n", "
Ada | \n", "INF4331 | \n", "94 | \n", "
\n", "Some colorful text.\n", "
\n" ], "text/plain": [ "\n", "Some colorful text.\n", "
" ] } ], "metadata": { "celltoolbar": "Slideshow", "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.12" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": {}, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 4 }